﻿using Developer.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Developer.Web.Areas.Admin.Controllers
{
    public class StatisticController : BaseController
    {
        // GET: Admin/Statistic
        public ActionResult RepairIndex()
        {
            var statistic = RepairColorService.GetAll().Where(a => a.IsAbort == false);
            return View(statistic);
        }

        public ActionResult RepairBrand()
        {
            var statistic = RepairBrandService.GetAll().Where(a => a.IsAbort == false);
            return View(statistic);
        }

        public ActionResult RepairBrandDetail(int bid)
        {
            var statistic = RepairColorService.GetAll().Where(a=>a.RepairModel.RepairBrandId == bid);
            return View(statistic);
        }



        public ActionResult CycleIndex()
        {
            var statistic = CycleModelService.GetAll().Where(a => a.IsAbort == false);
            return View(statistic);
        }

        public ActionResult CycleBrand()
        {
            var statistic = CycleBrandService.GetAll().Where(a => a.IsAbort == false);
            return View(statistic);
        }

        public ActionResult CycleBrandDetail(int bid)
        {
            var statistic = CycleModelService.GetAll().Where(a => a.CycleBrandId == bid);
            return View(statistic);
        }
    }
}